package com.ruoyi.part.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.utils.vo.PoCommon;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 零件采购对象 dms_parts_purchase_order
 * 
 * @author liuchuanfa
 * @date 2024-03-17
 */
public class DmsPartsPurchaseOrder extends PoCommon
{
    private static final long serialVersionUID = 1L;

    /** 厂端id */
    @Excel(name = "厂端id")
    private Long factoryId;

    /** 经销商id */
    @Excel(name = "经销商id")
    private Long dealerId;

    /** 经销商名称 */
    @Excel(name = "经销商名称")
    private String dealerName;

    /** 采购状态(0已发起采购，等待审核 1待销售审核 2待财务审核 3待配件 4待扣款 5待发货 6待收货 7已签收  8审核失败) */
    @Excel(name = "采购状态", readConverterExp = "0=已发起采购，等待审核,1=待销售审核,2=待财务审核,3=待配件,4=待扣款,5=待发货,6=待收货,7=已签收,8=审核失败")
    private Integer purchaseStatus;

    /** 采购零件的数量 */
    @Excel(name = "采购零件的数量")
    private Integer wholePurchaseNumber;

    /** 采购的总价 */
    @Excel(name = "采购的总价")
    private Double purchasePrice;

    /** 支付方式（0微信支付、1支付宝支付、2现金支付、3银行卡支付） */
    @Excel(name = "支付方式", readConverterExp = "0=微信支付,1=支付宝支付,2=现金支付,3=银行卡支付")
    private Integer paymentMethod;

    /** 采购备注 */
    @Excel(name = "采购备注")
    private String purchaseRemark;

    /** 仓库 */
    @Excel(name = "仓库")
    private Integer whseCode;

    /** 期望交货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "期望交货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expectedDeliveryDate;

    /** 发运方式(1=海运,2=空运,3=陆运) */
    @Excel(name = "发运方式", readConverterExp = "1=海运,2=空运,3=陆运")
    private Integer shipmentType;

    /** 收货人 */
    @Excel(name = "收货人")
    private String receiver;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String telephone;

    /** 地址 */
    @Excel(name = "地址")
    private String address;

    /** 审核人id */
    @Excel(name = "审核人id")
    @TableField(value = "auditor_id", fill = FieldFill.INSERT_UPDATE)
    private Long auditorId;

    /** 审核人名称 */
    @Excel(name = "审核人名称")
    @TableField(value = "auditor_name", fill = FieldFill.INSERT_UPDATE)
    private String auditorName;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "auditor_time", fill = FieldFill.INSERT_UPDATE)
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date auditorTime;

    /** 零件采购详细信息 */
    private List<DmsPartsPurchaseOrderDetail> dmsPartsPurchaseOrderDetailList;


    public void setFactoryId(Long factoryId) 
    {
        this.factoryId = factoryId;
    }

    public Long getFactoryId() 
    {
        return factoryId;
    }
    public void setDealerId(Long dealerId) 
    {
        this.dealerId = dealerId;
    }

    public Long getDealerId() 
    {
        return dealerId;
    }
    public void setDealerName(String dealerName) 
    {
        this.dealerName = dealerName;
    }

    public String getDealerName() 
    {
        return dealerName;
    }
    public void setPurchaseStatus(Integer purchaseStatus) 
    {
        this.purchaseStatus = purchaseStatus;
    }

    public Integer getPurchaseStatus() 
    {
        return purchaseStatus;
    }
    public void setWholePurchaseNumber(Integer wholePurchaseNumber) 
    {
        this.wholePurchaseNumber = wholePurchaseNumber;
    }

    public Integer getWholePurchaseNumber() 
    {
        return wholePurchaseNumber;
    }
    public void setPurchasePrice(Double purchasePrice) 
    {
        this.purchasePrice = purchasePrice;
    }

    public Double getPurchasePrice() 
    {
        return purchasePrice;
    }
    public void setPaymentMethod(Integer paymentMethod) 
    {
        this.paymentMethod = paymentMethod;
    }

    public Integer getPaymentMethod() 
    {
        return paymentMethod;
    }
    public void setPurchaseRemark(String purchaseRemark) 
    {
        this.purchaseRemark = purchaseRemark;
    }

    public String getPurchaseRemark() 
    {
        return purchaseRemark;
    }
    public void setWhseCode(Integer whseCode) 
    {
        this.whseCode = whseCode;
    }

    public Integer getWhseCode() 
    {
        return whseCode;
    }
    public void setExpectedDeliveryDate(Date expectedDeliveryDate) 
    {
        this.expectedDeliveryDate = expectedDeliveryDate;
    }

    public Date getExpectedDeliveryDate() 
    {
        return expectedDeliveryDate;
    }
    public void setShipmentType(Integer shipmentType) 
    {
        this.shipmentType = shipmentType;
    }

    public Integer getShipmentType() 
    {
        return shipmentType;
    }
    public void setReceiver(String receiver) 
    {
        this.receiver = receiver;
    }

    public String getReceiver() 
    {
        return receiver;
    }
    public void setTelephone(String telephone) 
    {
        this.telephone = telephone;
    }

    public String getTelephone() 
    {
        return telephone;
    }
    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }
    public void setAuditorId(Long auditorId) 
    {
        this.auditorId = auditorId;
    }

    public Long getAuditorId() 
    {
        return auditorId;
    }
    public void setAuditorName(String auditorName) 
    {
        this.auditorName = auditorName;
    }

    public String getAuditorName() 
    {
        return auditorName;
    }
    public void setAuditorTime(Date auditorTime) 
    {
        this.auditorTime = auditorTime;
    }

    public Date getAuditorTime() 
    {
        return auditorTime;
    }


    public List<DmsPartsPurchaseOrderDetail> getDmsPartsPurchaseOrderDetailList()
    {
        return dmsPartsPurchaseOrderDetailList;
    }

    public void setDmsPartsPurchaseOrderDetailList(List<DmsPartsPurchaseOrderDetail> dmsPartsPurchaseOrderDetailList)
    {
        this.dmsPartsPurchaseOrderDetailList = dmsPartsPurchaseOrderDetailList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("factoryId", getFactoryId())
            .append("dealerId", getDealerId())
            .append("dealerName", getDealerName())
            .append("purchaseStatus", getPurchaseStatus())
            .append("wholePurchaseNumber", getWholePurchaseNumber())
            .append("purchasePrice", getPurchasePrice())
            .append("paymentMethod", getPaymentMethod())
            .append("purchaseRemark", getPurchaseRemark())
            .append("whseCode", getWhseCode())
            .append("expectedDeliveryDate", getExpectedDeliveryDate())
            .append("shipmentType", getShipmentType())
            .append("receiver", getReceiver())
            .append("telephone", getTelephone())
            .append("address", getAddress())
            .append("auditorId", getAuditorId())
            .append("auditorName", getAuditorName())
            .append("auditorTime", getAuditorTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("createUserName", getCreateUserName())
            .append("updateUserName", getUpdateUserName())
            .append("version", getVersion())
            .append("deleteFlag", getDeleteFlag())
            .append("dmsPartsPurchaseOrderDetailList", getDmsPartsPurchaseOrderDetailList())
            .toString();
    }
}
